package com.xingda.packing.enums;

/**
 * 工字轮完成状态
 * @author LEGION
 *
 */
public enum WheelFinishedState {
	
	SEMI_FINISHED(0,"0001B2100000000496VA","半成品"),
	FINISHED(1,"0001B2100000000496V9","成品"),
	UNKNOW(-1,"00000000000000000000","未知")
	;
	
	private final int code;
	
	private final String pk;
	
	private final String desc;

	WheelFinishedState(int code,String pk, String desc) {
		this.code=code;
		this.pk = pk;
		this.desc = desc;
	}

	public int getCode() {
		return code;
	}

	public String getPk() {
		return pk;
	}

	public String getDesc() {
		return desc;
	}
	
	public static WheelFinishedState getByCode(int code) {
		for(WheelFinishedState state:WheelFinishedState.values()) {
			if (state.getCode()==code) {
				return state;
			}
		}
		return UNKNOW;
	}


}
